package com.ruoyi.business.service.impl.quickrepay;

import com.ruoyi.bizsys.domain.LoanIou;
import com.ruoyi.bizsys.domain.ReduceConfig;
import com.ruoyi.business.Vo.CustReduceRes;
import com.ruoyi.business.service.CustReduceProess;
import com.ruoyi.bizsys.utils.BizConstants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @author wqg
 * @description 开关判断
 * @date 2022/4/7
 */
@Slf4j
@Order(0)
@Component
public class ReduceStatusImpl implements CustReduceProess {
    @Override
    public CustReduceRes handle(ReduceConfig reduceConfig, LoanIou loanIou, CustReduceRes custReduceRes) {
        if(!BizConstants.BIZ_STATUS_1.equals(reduceConfig.getStatus())){
            log.info("CustReduceProess:未开启减免功能");
            custReduceRes.setIsHave(false);
            return custReduceRes;
        }
        return custReduceRes;
    }

}
